<?php
header("Content-type:text/html;charset=utf-8");
    $conn = mysql_connect("localhost","root","root");

    mysql_select_db("2012");

    $userPhone = $_POST["userPhone"];
    $userPwd= $_POST["userPwd"];
    
    $result = mysql_query("select * from user where userPhone='$userPhone' and userPwd='$userPwd'",$conn);
    if(mysql_num_rows($result)>0){
        echo 1;
    }else{
        echo 0;
    }
    mysql_close($conn);
?>

